package com.demo.service.impl;

import com.demo.dao.CourseDao;
import com.demo.dao.DepartmentDao;
import com.demo.dao.impl.CourseDaoImpl;
import com.demo.dao.impl.DepartmentDaoImpl;
import com.demo.entity.Course;
import com.demo.entity.Department;
import com.demo.service.CourseService;
import com.demo.service.DepartmentService;

import java.io.Serializable;
import java.util.Map;

public class DepartmentServiceImpl implements DepartmentService {
    public void add(Department vo) {
        //你看这个对象是哪个
        DepartmentDao departmentDao = new DepartmentDaoImpl();

        departmentDao.add(vo);
    }

    //@Override
    public void delete(long depId) {
        DepartmentDao departmentDao = new DepartmentDaoImpl();

        departmentDao.delete(depId);
    }

    //@Override
    public void update(Department vo) {
        DepartmentDao departmentDao = new DepartmentDaoImpl();
        departmentDao.update(vo);
    }

    //@Override
    public Department get(Serializable id) {
        DepartmentDao departmentDao = new DepartmentDaoImpl();
        return departmentDao.get(id);
    }

    //@Override
    public Map<String, Object> list(Map<String, Object> params) {
        DepartmentDao departmentDao = new DepartmentDaoImpl();
        return departmentDao.list(params);
    }
}
